package com.direct.ratelimit.limit;

/**
 * describes a defined limit TODO evaluate immutability of this object
 * 
 * @author srstone
 * 
 */
public class Limit {

	private String id;
	/**
	 * what is the limit on the number of request
	 */
	private long requestLimit;

	/**
	 * time frame that this is limit applies to
	 */
	private TimeFrame timeFrame;

	/**
	 * if the resource limit is specifc to a resource this is the identifier
	 */
	private String resourceIdentifier;

	/**
	 * if this clientid is specific to a client
	 */
	private String clientId;

	private boolean global;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public long getRequestLimit() {
		return requestLimit;
	}

	public void setRequestLimit(long requestLimit) {
		this.requestLimit = requestLimit;
	}

	public TimeFrame getTimeFrame() {
		return timeFrame;
	}

	public void setTimeFrame(TimeFrame timeFrame) {
		this.timeFrame = timeFrame;
	}

	public boolean isGlobal() {
		return global;
	}

	public void setGlobal(boolean global) {
		this.global = global;
	}

	public String getResourceIdentifier() {
		return resourceIdentifier;
	}

	public void setResourceIdentifier(String resourceIdentifier) {
		this.resourceIdentifier = resourceIdentifier;
	}

	// public void setClientId(String clientId) {
	// this.clientId = clientId;
	// }
	//
	// public String getClientId() {
	// return clientId;
	// }

}
